Class loading is a mechanism performed by class loaders in a JAVA Virtual Machine (JVM) to load JAVA classes for a JAVA application into the JVM. The JAVA class loaders are organized in a hierarchy with system class loaders being ranked higher than the custom class loaders. The system class loader loads all the necessary classes into a cache before executing an application. The custom class loader loads the classes into the cache during run-time of the application.
There are various class loading mechanisms that exist today. One such mechanism is Websphere class loading caching. Websphere class loading caching operates by initially loading large number of JAVA classes into a cache at one time and distributing the loaded JAVA classes into a class load environment to be reused for subsequent loading. However, this initial loading of the large number of the JAVA classes at one time can be time consuming. This is because a JAVA program object for each of the JAVA classes is created and source code for each of the JAVA classes are verified during the initial loading of the JAVA classes.
Another class loading mechanism is just-in-time (JIT) compilation. JIT compilation performs a dynamic translation of source code in a JAVA class to byte code, which is then cached for later use. One problem with JIT compilation is that it ignores any content in the source code that may be used to determine which JAVA classes are to be cached at a later time.